package com.htthorizon.model.service;

import com.htthorizon.model.domain.ModelMessageFlow;
import com.htthorizon.model.mapper.ModelMessageFlowMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Brilliant
 */
@Service
public class ModelMessageFlowServiceImpl implements IModelMessageFlowService{

    @Autowired
    private ModelMessageFlowMapper modelMessageFlowMapper;

    @Override
    public Long addFlow(ModelMessageFlow modelMessageFlow) {
        return modelMessageFlowMapper.insert(modelMessageFlow);
    }

    @Override
    public List<ModelMessageFlow> getByMessageId(Long messageId) {
        return modelMessageFlowMapper.getByMessageId(messageId);
    }

    @Override
    public void delByMessageId(Long id) {
        modelMessageFlowMapper.delByMessageId(id);
    }

    @Override
    public List<Long> getModelMessageIdByUserId(Long userId) {
        return modelMessageFlowMapper.getModelMessageIdByUserId(userId);
    }
}
